﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Joyintech.BLL.inpiao365;
using System.Data;
using Joyintech.Model.inpiao365;

namespace Joyintech.Web.inpiao365.UserCenter
{
    public partial class MyTicket_order : System.Web.UI.Page
    {
        private order_BLL orderBll = null;

        protected void Page_Load(object sender, EventArgs e)
        {
             customer currentCustomer = customer_BLL.GetInstance().GetCurrentCustomer();

             if (currentCustomer == null)
             {
                 Response.Redirect("UserLogin.aspx");
             }
            
            if (!IsPostBack)
            {

                BindOrderList();
            }
        }

        /// <summary>
        /// 绑定限时处理的订单列表数据
        /// </summary>
        protected void BindOrderList()
        {
            customer currentCustomer = customer_BLL.GetInstance().GetCurrentCustomer();
            orderBll = new order_BLL();
            DataSet orderlist = orderBll.GetOrderList(currentCustomer.CustomerId);
            if (orderlist != null && orderlist.Tables.Count > 0)
            {
                orderList.DataSource = orderlist.Tables[0];
                orderList.DataBind();
            }
        }
    }
}